import './assets/main.scss'

import { createApp } from 'vue'
import * as echarts from 'echarts';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from '@/router'
import { createPinia } from 'pinia'
import { createPersistedState } from 'pinia-persistedstate-plugin'
import App from './App.vue'

// 初始化 Vue 应用
const app = createApp(App);

// 配置 Pinia（状态管理库）
const pinia = createPinia();
const persist = createPersistedState();
pinia.use(persist);

// 挂载 ECharts 到全局属性
app.config.globalProperties.$echarts = echarts;

// 挂载插件
app.use(pinia);
app.use(ElementPlus);
app.use(router);

// 挂载应用到 DOM
app.mount('#app');
